.NET Framework Class Library |
ConcurrentBag<(Of <(T>)>)..::.TryPeek Method |
ConcurrentBag<(Of <(T>)>) Class See Also Send Feedback |
Attempts to return an object from the ConcurrentBag<(Of <(T>)>)
without removing it.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function TryPeek ( _ <OutAttribute> ByRef result As T _ ) As Boolean |
C# |
---|
public bool TryPeek( out T result ) |
Parameters
- result
- Type:
T
%
When this method returns, result contains an object from the ConcurrentBag<(Of <(T>)>) or the default value of T if the operation failed.